package com.vit.service;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.vit.dao.UserDAO;
import com.vit.domain.User;
/**
 * ServiceImpl for User
 * @author i80260
 *
 */
public class UserServiceImpl implements UserService{

	private UserDAO userDao;
	
	//annotation based declarative transaction
	@Transactional(propagation=Propagation.REQUIRED)	
	public User saveUser(User user) 
	{
		return userDao.saveUser(user);
	}
	public void setUserDao(UserDAO userDAO) {
		this.userDao = userDAO;
	}
}
